<style type="text/css">
    /*快递运费模板*/
    .w60 { width:160px !important;}
    .w100 { width:200px !important;}
    .ncsu-trans-type { background-color: #FFF; border: solid #DDD 1px;}
    .ncsu-trans-type .default { line-height: 30px; background-color: #E6E6E6; min-height: 30px; padding: 4px 10px;}
    .postage-tpl .postage-detail { padding: 5px; margin: 5px 0; border: 1px dashed #D3E5F3;}
    .postage-tpl .express .section { margin-bottom: 8px;}
    .postage-tpl .input_readonly { background-color: #E6E6E6; border: 1px solid #CCC;}
    .postage-tpl .batch { line-height: 20px; background-color: #FAFAFA; height: 20px; padding: 5px; border-bottom: solid 1px #E6E6E6;}
    .postage-tpl .tbl-attach { background-color: #E6E6E6; height: 30px; padding: 4px 2px;}
    .postage-tpl .input-error { background-color: #FFF2F2; border: 1px solid #FF8080;}
    .postage-tpl span.msg:after { display: none;}
    .J_DefaultMessage { display: block; clear: both;}
    .J_Message { color: #F00; display: inline-block;}
    .J_Message i { vertical-align: middle; margin-right: 5px;}
    .postage-tpl span.msg { margin-right: 3px;}
    .postage-tpl span.error, .postage-tpl span.stop { display: inline-block; float: none;}
    /*运费模板选择地区弹出层*/
    .ks-ext-mask {filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#BFFFFFFF', endColorstr='#BFFFFFFF');background:rgba(0,0,0,0.3);}
    .dialog-areas, .dialog-batch { background-color: #FFF; margin-left: -320px; border: 1px solid #CCC; position: fixed; z-index: 9999; top: 25%; left: 40%;}
    .dialog-batch { top: 40%;}
    .ks-contentbox { display: block; }
    .ks-contentbox .title { font-size: 14px; line-height: 20px; font-weight: bold; color: #555; background-color: #FFF; height: 20px; padding: 10px; border-bottom: solid 1px #E6E6E6; position: relative; z-index: 1;}
    a.ks-ext-close { font: lighter 14px/20px Verdana; color: #999; text-align: center; display: block; width: 20px; height: 20px; position: absolute; z-index: 1; top: 10px; right: 10px; cursor: pointer;}
    a:hover.ks-ext-close { text-decoration: none; color: #27A9E3;}
    .dialog-areas ul { display: block; padding: 10px;}
    .dialog-areas li { display: block; width: 100%; clear: none;}
    .dialog-areas li.even {	background-color: #F7F7F7;}
    .ncsc-region { font-size: 0; *word-spacing:-1px/*IE6、7*/; overflow: visible!important;}
    .ncsc-region-title { font-size: 12px; line-height: normal!important; vertical-align: top; letter-spacing: normal; word-spacing: normal; text-align: left!important; display: inline-block; padding: 0!important; width:100px!important; }
    .ncsc-region-title span { line-height: 20px; color: #333; font-weight: bold; display: block; height: 20px; padding: 5px 0 4px 10px; }
    .ncsc-province-list { font-size: 0!important; *word-spacing:-1px/*IE6、7*/; vertical-align: top; letter-spacing: normal; word-spacing: normal; display: inline-block; width: 550px!important; padding: 0!important;}
    .ncsc-province { font-size: 12px; vertical-align: top; letter-spacing: normal; word-spacing: normal; display: inline-block; width: 105px; height: 30px; position: relative; z-index: 1;}
    .ncsc-province-tab { line-height: 20px; display: block; height: 20px; padding: 4px; margin: 1px 1px 0 1px;}
    .ncsc-province-tab input, .ncsc-province-tab label { vertical-align: middle;}
    .ncsc-province-tab .check_num { font: 12px/16px Verdana, Geneva, sans-serif; color: #28B779; letter-spacing: -1px; vertical-align: middle; padding-right: 1px;}
    .ncsc-province-tab i { font-size: 12px; color: #CCC; margin-left: 4px; cursor: pointer;}
    .ncsc-province-tab:hover i { color: #555;}
    .showCityPop { z-index: 2;}
    .showCityPop .ncsc-province-tab { background-color: #FFFEC6; margin: 0; border-style: solid; border-width: 1px 1px 0 1px; border-color: #F7E4A5 #F7E4A5 transparent #F7E4A5;}
    .ncsc-citys-sub { background-color: #FFFEC6; white-space: normal; display: none; width: 240px; border: 1px solid #F7E4A5; position: absolute; z-index: -1; top: 28px; left: 0;}
    .showCityPop .ncsc-citys-sub  { font-size: 0; *word-spacing:-1px/*IE6、7*/; display: block;}
    .ncsc-citys-sub .areas { font-size: 12px; line-height: 20px; vertical-align: middle; letter-spacing: normal; word-spacing: normal; display: inline-block; padding: 4px; margin-right: 4px;}
    .ks-contentbox .bottom { padding: 10px;}
    .ks-contentbox .batch { line-height: 30px; background-color: #FFF; text-align: center; height: 30px; padding: 20px 0; border-bottom: solid 1px #E6E6E6;}
    .checkbox { padding: 0; vertical-align: middle;}
    .hidden { display: none;}
</style>
<script type="text/javascript" src="__JS__/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="admin">
    <form method="post" id="myform" name="myform" action="">
        <div class="tab panel dux-tab admin-panel">
            <div class="panel-head">
                <div class="tab-head">
                    <strong>添加商品</strong>
                    <ul class="tab-nav">
                        <li class="active"><a href="#tab-1">基本信息</a></li>
                    </ul>
                </div>
            </div>
            <div class="tab-body">
                <table class="table table-hover">
                    <tr>
                        <td width='160px'><span class="c-red">*</span>模版名称：</td>
                        <td width='*'>
                            <input type="text" class="input input_big" value="{$list['title']}" datatype="*" id="title" name="title" />
                            <p class="J_Message" style="display:none" error_type="title"><i class="icon-exclamation-sign"></i>必须填写模板名称</p>
                        </td>
                        <td width='*'></td>
                    </tr>
                    <tr>
                        <td width='160px'><span class="c-red">*</span>运送方式：</td>
                        <td width='*'>除指定地区外，其余地区的运费采用"默认运费"</td>
                        <td width='*'></td>
                    </tr>
                    <tr>
                        <td width='160px'><span class="c-red">*</span>运送方式：</td>
                        <td width='*' class="trans-line">
                        </td>
                        <td width='*'></td>
                    </tr>
                    <tr>
                        <td width='160px'><span class="c-red">*</span>免运费条件：</td>
                        <td width='*'>
                            <div class="ncsc-mansong-rules J_DefaultSet">
                                订单满：
                                <input class="inputL input_smallL" type="text" aria-label="默认运费件数" maxlength="4" autocomplete="off" data-field="start" value="{$list['num']}" name="num">
                                件包邮
                                <div class="J_DefaultMessage"></div>
                            </div>
                            <div class="ncsc-mansong-rules J_DefaultSet">
                                订单满：
                                <input class="inputL input_smallL" type="text" aria-label="默认运费件数" maxlength="4" autocomplete="off" data-field="start" value="{$list['money']}" name="money">
                                元包邮
                                <div class="J_DefaultMessage"></div>
                            </div>
                        </td>
                        <td width='*'></td>
                    </tr>
                </table>
            </div>
            <div class="panel-foot text-center">
                <div class="form-button">
                    <input name="id" type="hidden" value="{$list['id']}">
                    <input class="button bg-main" type="submit" value="确认保存">
                    <button class="button bg" type="reset">取消</button>
                </div>
            </div>
        </div>

    </form>
    <include file="area" />
    <script src="__JS__/store/transport.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.trans-line').append(TransTpl.replace(/TRANSTYPE/g, 'kd'));
            $('.tbl-except').append(RuleHead);

            <foreach item='v' name="list['trans']">
                <if condition="$v['is_default'] eq 1">
                                
                    var cur_tr = $('.tbl-except').prev();
                    $(cur_tr).find('input[data-field="start"]').val({$v['snum']});
                    $(cur_tr).find('input[data-field="postage"]').val({$v['sprice']});
                    $(cur_tr).find('input[data-field="plus"]').val({$v['xnum']});
                    $(cur_tr).find('input[data-field="postageplus"]').val({$v['xprice']});
                
                <else />
                
                    StartNum += 1;
                    cell = RuleCell.replace(/CurNum/g, StartNum);
                    cell = cell.replace(/TRANSTYPE/g, 'kd');
                    $('.tbl-except').find('table').append(cell);
                    $('.tbl-attach').find('.J_ToggleBatch').css('display', '').html('批量操作');
                    var cur_tr = $('.tbl-except').find('table').find('tr:last');
                    $(cur_tr).find('.area-group>p').html("{$v['area_name']}");
                    $(cur_tr).find('input[type="hidden"]').val('<?php echo ltrim(implode('|||', array($v['area_id'],$v['area_name'])),',') ?>');
                    $(cur_tr).find('input[data-field="start"]').val({$v['snum']});
                    $(cur_tr).find('input[data-field="postage"]').val({$v['sprice']});
                    $(cur_tr).find('input[data-field="plus"]').val({$v['xnum']});
                    $(cur_tr).find('input[data-field="postageplus"]').val({$v['xprice']});
                
                </if>
            </foreach>
        });
    </script>
</div>
<div id="tbox">
    <div class="btn" id="gotop" style="display:none;"><i class="top"></i><a href="javascript:void(0);">返回顶部</a></div>
</div>
<script type="text/javascript">
    $('#myform').layer({});
</script>
